package com.ruibang.glass.file.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruibang.glass.common.domain.file.FileBusiness;
import com.ruibang.glass.file.domain.req.PreviewFileReq;
import com.ruibang.glass.file.entity.FileInfo;
import com.teaming.cloud.framework2.autoconfigure.mybatisplus.mapper.CommonMapper;
import org.apache.ibatis.annotations.Param;

import java.io.File;
import java.util.List;

/**
 * <p>
 * 文件信息Mapper
 * </p>
 *
 * @author wujie
 * @since 2023-11-05
 */
public interface FileMapper extends CommonMapper<FileInfo> {

   void updateStatusById(@Param("fileId") String fileId,@Param("status") String status);

   void updateBusinessById(@Param("fileBusiness") FileBusiness fileBusiness);

   void updateByBusinessId(@Param("businessId") String businessId);

   void updateByFileBusiness(@Param("fileBusiness") FileBusiness fileBusiness );

   List<FileInfo> queryFileByIds(@Param("fileIds") List<String> fileIds);

   List<String> getFileIdsByBusinessId(@Param("businessId") String businessId);

   List<FileInfo> getFileBusinessByIds(@Param("businessIds") List<String> businessIds);

   List<FileInfo> queryFileByBusinessId(@Param("businessId") String businessId);

   List<FileInfo> getPreviewByBusinessParam(@Param("fileBusiness") FileBusiness fileBusiness);
}
